// const { resolve } = require('path')
module.exports = {
  /*
  ** Headers of the page
  */
  head: {
    title: '柳州教育智慧校园',
    meta: [
      { charset: 'utf-8' },
      { name:'renderer',content:'webkit' },  //锁定360浏览器为极速浏览器
      { name: 'viewport', content: 'width=device-width, initial-scale=1 ,maximum-scale=1.0,user-scalable=no' },
      { hid: 'description', name: 'description', content: 'Nuxt.js project' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },
  /*
  ** Customize the progress bar color
  */
  // loading: { color: '#3B8070' },
  loading: false,
  
  // 插件扩展,开启多个插件扩展需要使用对象
  plugins: [
    { src: "~plugins/vue-notifications.js", ssr: true  },
    { src: '~plugins/nuxt-video-player-plugin.js', ssr: false },
    { src: '~plugins/pdfobject.js', ssr: false},
    { src: '~/plugins/components',ssr: true}
  ],

  
  css:[
    'video.js/dist/video-js.css',
    'assets/css/icomoon.css'
  ],

  // 全局路由动画
  layoutTransition: 'layout',
  
  modules: [
    '@nuxtjs/style-resources',
    '@gauseen/nuxt-proxy',
  ],
  
  // 引入自定义scss
  styleResources: {
    scss: '~/assets/sass/rest.scss'
  },
  
  proxyTable: {
    '/web':{ 
      target: 'http://192.168.0.239:9191',
      ws: false, // 是否支持websocket
      pathRewrite: { '^/web': '/web' }
    }
  },

  /*
  ** Build configuration
  */
  build: {
    /*
    ** Run ESLint on save
    */
    vendor: ['axios'], // 为防止重复打包
    extend (config, { isDev, isClient }) {
      if (isDev && isClient) {
        config.module.rules.push({
          enforce: 'pre',
          test: /\.(js|vue)$/,
          loader: 'eslint-loader',
          exclude: /(node_modules)/
        })
        
      }
    }
  }  
  
}

